#!/usr/bin/perl
use Getopt::Std;
getopt("t:o", \%args);
my $tfamfile = $args{t};
my $outfile = $args{o};
chomp($tfamfile);
chomp($outfile);
open BUFF,"< $tfamfile"  or die "cannot open tfamfile $tfamfile";
open(WBUFF,">$outfile");
print WBUFF "SampleID\tFLAG\tMISSING_GENO_CLEAN\tNUM_GENO_CLEAN\tQC_SAMPLE_FLAG\tQC_SAMPLE_IND\tQC_SEX_IND\tPLINK_SEX_IMP_ESTIMATE\n"; 
while($line=<BUFF>)
{
	chomp($line);
	@array = split(" ",$line);
	print WBUFF "$array[1]\tY\t0\t0\t1\t1\tNA\tNA\n";	
}
close(WBUFF);
close(BUFF);
